package org.example.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.example.entity.Clan;
import org.example.exception.NoClanException;
import org.example.exception.NoInThisClan;
import org.example.exception.PermissionsDenyException;
import org.example.exception.ShouldNotBeStudent;
import org.example.vo.FamilyTree;
import org.springframework.transaction.annotation.Transactional;

public interface ClanService extends IService<Clan> {
    @Transactional
    void combineFamily(int sender, int receiver) throws  PermissionsDenyException;

    void combineFamily(int parentId) throws Exception, PermissionsDenyException;

    FamilyTree findFamilyTree() throws NoClanException;

    void disableClan() throws PermissionsDenyException, NoClanException;

    void removeFamily(int targetId) throws PermissionsDenyException, NoClanException, NoInThisClan;

    void transferLeader(int targerId) throws PermissionsDenyException, NoInThisClan, ShouldNotBeStudent;
}
